package com.yyfax.pay.depository.service.inner;

import com.yyfax.pay.common.model.vo.BackResultFormVO;
import com.yyfax.pay.common.model.vo.RedirectFormVO;
import com.yyfax.pay.depository.domain.FuiouCharge;
import com.yyfax.pay.depository.domain.FuiouChargeTransfer;
import com.yyfax.pay.depository.vo.FuiouChargeTransferVO;
import com.yyfax.pay.depository.vo.FuiouChargeVO;
import com.yyfax.pay.third.model.to.fuioudeposit.ChargeNotifyReq;
import com.yyfax.pay.third.model.to.fuioudeposit.EBankChargeBackReq;
import com.yyfax.pay.third.model.to.fuioudeposit.FuiouEbankFormVO;
import com.yyfax.pay.third.model.to.fuioudeposit.FuiouTransferChargeFormVO;
import com.yyfax.pay.third.model.to.fuioudeposit.TransferChargeBackReq;
import com.yyfax.pay.vo.depository.ChargeBaseReq;
import com.yyfax.pay.vo.depository.TransferChargeRsp;

/**
 * 充值内部服务
 * 
 * @author buyi
 * @date 2017-08-30 10:39:30
 * @since v2.0.0
 */
public interface ChargeInnerService {

	/**
	 * 保存网银充值订单信息
	 * 
	 * @author buyi
	 * @date 2017-08-29 19:03:19
	 * @since v2.0.0
	 * @param merchantCode
	 * @param params
	 * @return
	 * @throws Exception
	 */
	public FuiouChargeVO saveCharge(String merchantCode, ChargeBaseReq params) throws Exception;

	/**
	 * 获取网银第三方路由路径<br>
	 * 
	 * @author buyi
	 * @date 2017-08-30 10:48:38
	 * @since v2.0.0
	 * @param vo
	 * @return 返回form表单数据实体
	 * @throws Exception
	 */
	public RedirectFormVO<FuiouEbankFormVO> getEbankForm(FuiouChargeVO vo) throws Exception;

	/**
	 * 解析网银充值同步返回结果
	 * 
	 * @author buyi
	 * @date 2017-09-04 18:44:36
	 * @since v2.0.0
	 * @param merchantCode
	 * @param req
	 * @return
	 */
	public FuiouCharge parseEbankBackResult(String merchantCode, EBankChargeBackReq req);

	/**
	 * 获取路由实体
	 * 
	 * @author buyi
	 * @date 2017-09-02 10:41:04
	 * @since v2.0.0
	 * @param po
	 * @return
	 * @throws Exception
	 */
	public RedirectFormVO<BackResultFormVO> getRouteForm(FuiouCharge po) throws Exception;

	/**
	 * 解析网银充值异步返回结果
	 * 
	 * @author buyi
	 * @date 2017-09-02 16:27:59
	 * @since v2.0.0
	 * @param merchantCode
	 * @param req
	 * @return
	 */
	public String parseChargeNotifyResult(String merchantCode, ChargeNotifyReq req);

	/**
	 * 查询充值结果
	 * 
	 * @author buyi
	 * @date 2017-09-25 15:16:39
	 * @since v2.0.0
	 * @param busiId 业务流水号
	 */
	public FuiouChargeVO queryResult(String busiId);

	/**
	 * 获取第三方转账充值的页面跳转表格
	 * 
	 * @author buyi
	 * @date 2018-03-28 10:51:39
	 * @since v2.1.3
	 * @param vo
	 * @return
	 */
	public RedirectFormVO<FuiouTransferChargeFormVO> getTransfer(FuiouChargeVO vo);

	/**
	 * 解析转账充值回跳请求
	 * 
	 * @author buyi
	 * @date 2018-03-28 11:27:34
	 * @since v2.0.4
	 * @param merchantCode
	 * @param req
	 * @return
	 */
	public FuiouCharge parseTransferBackResult(String merchantCode, TransferChargeBackReq req);

	/**
	 * 协议充值
	 * 
	 * @author buyi
	 * @date 2018-06-20 14:44:17
	 * @since v2.2.2
	 * @param po
	 * @return
	 */
	public FuiouCharge doProtocolSignRecharge(FuiouCharge po);

	/**
	 * 发起转账充值
	 * 
	 * @author buyi
	 * @date 2018-06-04 16:00:59
	 * @since v2.2.1
	 * @param vo
	 * @return
	 */
	public FuiouChargeTransferVO doTransfer(FuiouChargeVO vo);

	/**
	 * 获取转账充值响应参数
	 * 
	 * @author buyi
	 * @date 2018-06-05 16:53:56
	 * @since v2.2.1
	 * @param fuiouChargeTransfer
	 * @return
	 */
	public TransferChargeRsp getTransferChargeRsp(FuiouCharge fuiouCharge, FuiouChargeTransfer fuiouChargeTransfer);

	/**
	 * 获取转账充值响应参数
	 * 
	 * @author buyi
	 * @date 2018-06-06 16:09:50
	 * @since v1.0.0
	 * @param busiId
	 * @return
	 */
	public TransferChargeRsp getTransferChargeRsp(FuiouCharge fuiouCharge);
}
